package cn.wildfirechat.app.shiro;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.shiro.authc.AuthenticationToken;

@ToString
public class AccountPasswordToken implements AuthenticationToken {
    private final String userId;
    private final String password;

    public AccountPasswordToken(String userId, String password) {
        this.userId = userId;
        this.password = password;
    }

    @Override
    public Object getPrincipal() {
        return userId;
    }

    @Override
    public Object getCredentials() {
        return password;
    }
}
